package com.feib.soeasy.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * @title (#)PaymentCanceled.java<br>
 * @description 繳費單註銷紀錄<br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/11/10 create by Jimmy Liu<br>
 */
@Entity
@Table(name = "PAYMENT_CANCELED")
public class PaymentCanceled extends BaseEntity {

    private static final long serialVersionUID = 803618193199040762L;
    
    /**
     * PK in Table
     */
    private Long paymentCanceledPk;
    
    /**
     * 繳費單
     */
    private Payment payment;
    
    /**
     * 註銷日期
     */
    private Date cancelDate;
    
    /**
     * 註銷人員
     */
    private User cancelUser;
    
    /**
     * 註銷原因
     */
    private String cancelReason;
    
    /**
     * 註銷原因編號
     */
    private String cancelNo;
    
    /**
     * 確認放行日期
     */
    private Date confirmDate;
    
    /**
     * 確認放行人員
     */
    private User confirmUser;
    
    /**
     * 註銷狀態
     * True: 註銷
     * False: 不註銷
     * Null: 待放行
     */
    private Boolean confirmStatus;

    
    /**
     * @return the paymentCanceledPk
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="PAYMENT_CANCELED_PK", nullable=false)
    public Long getPaymentCanceledPk() {
        return paymentCanceledPk;
    }

    
    /**
     * @param paymentCanceledPk the paymentCanceledPk to set
     */
    public void setPaymentCanceledPk(Long paymentCanceledPk) {
        this.paymentCanceledPk = paymentCanceledPk;
    }

    
    /**
     * @return the payment
     */
    @ManyToOne
    @JoinColumn(name="PAYMENT_PK", nullable=false)
    public Payment getPayment() {
        return payment;
    }

    
    /**
     * @param payment the payment to set
     */
    public void setPayment(Payment payment) {
        this.payment = payment;
    }

    
    
    /**
     * @return the cancelDate
     */
    @Column(name="CANCEL_DATE")
    public Date getCancelDate() {
        return cancelDate;
    }


    
    /**
     * @param cancelDate the cancelDate to set
     */
    public void setCancelDate(Date cancelDate) {
        this.cancelDate = cancelDate;
    }


    
    /**
     * @return the cancelUser
     */
    @ManyToOne
    @JoinColumn(name="CANCEL_USER_PK")
    public User getCancelUser() {
        return cancelUser;
    }


    
    /**
     * @param cancelUser the cancelUser to set
     */
    public void setCancelUser(User cancelUser) {
        this.cancelUser = cancelUser;
    }


    
    /**
     * @return the cancelReason
     */
    @Column(name="CANCEL_REASON", length=200)
    public String getCancelReason() {
        return cancelReason;
    }


    
    /**
     * @param cancelReason the cancelReason to set
     */
    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }


    /**
     * @return the confirmDate
     */
    @Column(name="CONFIRM_DATE")
    public Date getConfirmDate() {
        return confirmDate;
    }

    
    /**
     * @param confirmDate the confirmDate to set
     */
    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }

    
    /**
     * @return the confirmUser
     */
    @ManyToOne
    @JoinColumn(name="CONFIRM_USER_PK")
    public User getConfirmUser() {
        return confirmUser;
    }

    
    /**
     * @param confirmUser the confirmUser to set
     */
    public void setConfirmUser(User confirmUser) {
        this.confirmUser = confirmUser;
    }

    
    /**
     * @return the confirmStatus
     */
    @Column(name="CONFIRM_STATULS")
    public Boolean getConfirmStatus() {
        return confirmStatus;
    }

    
    /**
     * @param confirmStatus the confirmStatus to set
     */
    public void setConfirmStatus(Boolean confirmStatus) {
        this.confirmStatus = confirmStatus;
    }


	/**
	 * @return the cancelNo
	 */
    @Column(name="CANCEL_NO", length=20)
	public String getCancelNo() {
		return cancelNo;
	}


	/**
	 * @param cancelNo the cancelNo to set
	 */
	public void setCancelNo(String cancelNo) {
		this.cancelNo = cancelNo;
	}    
}
